import request from '@/utils/request'

// 查询购物车
export function getCartList() {
  return request({
    url: '/cart/cart/getCartEntityList',
    method: 'get'
  })
}
// 修改购物车总额
export function checkCart(skuIds) {
  return request({
    url: '/cart/cart/checkCart/'+skuIds,
    method: 'get'
  })
}
// 查询执行购物车记录
export function findBySkuIdsCartEntityList(skuIds) {
  return request({
    url: '/cart/cart/findBySkuIdsCartEntityList/'+skuIds,
    method: 'get'
  })
}
// 用户端查询自己的优惠券列表
export function findSkuMinPrice(skuIds) {
  return request({
    url: '/discounts/coupon/findSkuMinPrice/'+skuIds,
    method: 'get'
  })
}
// 计算价格
export function findCouponSkuIdsVo(data) {
  return request({
    url: '/discounts/coupon/findCouponSkuIdsVo',
    method: 'post',
    data
  })
}
// 生成订单
export function createOrder(data) {
  return request({
    url: '/oms/order/createOrder',
    method: 'post',
    data
  })
}
//加入购物车
export function addCart(skuIdAndNum) {
  return request({
    url: '/cart/cart/addCart/'+skuIdAndNum,
    method: 'post',
  })
}
